home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / pstricks / inputs / pstricks.con < prev    next >
Text File  |  1993-04-07  |  15KB  |  362 lines

  1. %% BEGIN: pstricks.con
  2. %%
  3. %% Configuration file for PSTricks v0.93a, 93/03/12.
  4. %%
  5. %% !! SEE INSTRUCTIONS AT END !!
  6.  
  7.  
  8. %%%%%%%%%%% !! DRIVER CONFIGURATION DEFINITIONS GO HERE: !! %%%%%%%%%%%%%%
  9.  
  10.  
  11. %% **********************************************************************
  12. %% ***** Rokicki's dvips ***** Rokicki's dvips ***** Rokicki's dvips ****
  13. %% **********************************************************************
  14. %% Life is bliss with Rokicki's dvips (tested with v5.396, v5.47, 5.491):
  15. %%
  16. \def\pstdriver{Rokicki's dvips}
  17. {\catcode`\"=12\gdef\pstverb#1{\special{" #1}}}  % Check catcode of "
  18. \def\pstunit{1bp}%
  19. \def\pstVerb#1{\special{ps: #1}}
  20. \def\pstverbscale{SDict begin normalscale end}
  21. \def\pstheader#1{\special{header=#1}}
  22. %%
  23. %% In the following, CP is short for currentpoint.
  24. %% The neg is necessary because dvips scales the coordinates by 1 -1.
  25. %% \tx@NET means neg exch neg exch translate.
  26. \def\pstrotate{%
  27.   CP CP translate 3 -1 roll neg rotate \tx@NET}
  28. %%
  29. %% If using a version before 5.47, clipping may not work. You can
  30. %% try the following definition of \pstverb:
  31. %\def\pstverb#1{\special{ps: @beginspecial #1 @endspecial}}
  32. %% or change "{initclip}ifelse" to "if" in the definition of @setspecial
  33. %% in dvips' special.pro.
  34. %%
  35. %% ****************** END Rokicki's dvips *****************************
  36.  
  37.  
  38. %%%%%%%%%%%%%%%%%%% !! CUSTOMIZATION STUFF GOES HERE: !! %%%%%%%%%%%%%%%%%%
  39. %% If you want to include your own customizations to pstricks.tex, then
  40. %% uncomment the \pstcustomize command, and include your modifications
  41. %% after \pstcustomize. These will be read in after pstricks.tex.
  42. %\pstcustomize
  43.  
  44.  
  45. %%%%%%%%%%%%%%%%%%%%%%%%% !! END OF INPUT !! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  46. \endinput
  47.  
  48.  
  49. %%%%%%%%%%%%%%%%%%% !! GENERAL INSTRUCTIONS !! %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  50.  
  51. Because there are no standards for dvi-to-PS driver \special's,
  52. some driver-dependent commands must be defined in this file.
  53.  
  54. Possibly correct definitions for some dvi drivers are given below.
  55. Copy the section for the driver you want to use to the indicated place
  56. near the beginning of the file, replacing any other definitions you
  57. might find there.
  58.  
  59. When changing drivers, you may need to remake the header file.
  60.  
  61. See the PSTricks read-me file for further installation instructions.
  62.  
  63. Please report good and bad experiences with dvi-to-PS drivers,
  64. along with the definitions of these commands that worked
  65. for you, to tvz@Princeton.EDU.  Thanks.
  66.  
  67.  
  68. %%%%%%%%%%%%%%%% DESCRIPTION OF CONFIGURATION DEFINITIONS %%%%%%%%%%%%%%%
  69.  
  70. Here are the commands that must be defined in this file:
  71.  
  72.    \pstverb{}    -  The argument is included as verbatim PostScript,
  73.                     grouped by save and restore. The coordinate system
  74.     should be square, not rotated, and with the origin
  75.     at TeX's currentpoint.
  76.  
  77.    \pstVerb{}    -  The argument is included as verbatim PostScript, not
  78.                     grouped by (g)save and (g)restore. The currentpoint
  79.     should be TeX's currentpoint.
  80.  
  81.    \pstunit      -  The units used by driver for graphics included with
  82.                     \pstverb. Probably 1bp or 1sp.
  83.  
  84.    \pstverbscale - The PostScript code that scales the coordinate system
  85.                    from that in effect with \pstVerb to that in effect
  86.                    with \pstverb. Should not translate to the currentpoint.
  87.  
  88.    \pstrotate    - The PostScript code that takes a number off the stack
  89.                    and rotates the axes properly. I.e.,
  90.                    \pstVerb{angle \pstrotate} is used to begin rotations.
  91.  
  92.    \pstheader{}  - The argument is a header file (e.g., .pro file).
  93.                    If your driver does not support such a special, then
  94.                    the command might just remind you to include the header
  95.                    when printing. You can use PSTricks without a header,
  96.                    in which case it does not matter how you define
  97.                    \pstheader. See read-me.pst for details.
  98.                    If you cannot change the default directory where your
  99.                    driver looks for header files, and you cannot write to
  100.                    that directory, then you include the path for your
  101.                    PSTricks header files.
  102.                    E.g., \def\pstheader#1{\special{header=~/tex/#1}}.
  103.  
  104.    \pstdriver    - The name of the driver.
  105.  
  106.  
  107. %%%%%%%%% !! HOW TO MAKE A TEX FORMAT WITH PSTRICKS PRELOADED !! %%%%%%%%
  108.  
  109. See your local TeX documentation for instructions on creating a TeX format.
  110.  
  111. Before making the format, be sure that this configuration file is correct.
  112. It will be read only when creating the format, and not with every job.
  113.  
  114. If you are not using header files, there are no more special instructions.
  115.  
  116. Special instructions when using header files:
  117.  
  118.  - If you want to include supplementary PSTricks files (e.g., pst-node.tex),
  119.    add \input commands in the customization section above.
  120.  
  121.  - If your definition of \pstheader is, e.g.
  122.  
  123.      \def\pstheader#1{\special{\header=#1}}
  124.  
  125.    then change it to
  126.  
  127.      \def\pstheader#1{%
  128.        \expandafter\everyjob\expandafter{\the\everyjob
  129.          \special{header=#1}}}
  130.  
  131.    and put your original definition in the customization section, AFTER
  132.    any \input commands. E.g., the customization section might look like:
  133.  
  134.      \pstcustomize
  135.      \input pst-node.tex
  136.      \input pst-coil.tex
  137.      \def\pstheader#1{\special{header=#1}}
  138.  
  139.  - Input pstricks.tex at the appropriate time when creating the format.
  140.    E.g., when initex stops running:
  141.      *\input pstricks
  142.      *\dump
  143.  
  144.  
  145. %%%%%%%%%% !! CONFIGURATIONS FOR SOME DRIVERS !! %%%%%%%%%%%%%%%%%%%%%%%%
  146.  
  147.  
  148. %% **********************************************************************
  149. %% ***** Rokicki's dvips ***** Rokicki's dvips ***** Rokicki's dvips ****
  150. %% **********************************************************************
  151. %% Life is bliss with Rokicki's dvips (tested with v5.396, v5.47, 5.491):
  152. %%
  153. \def\pstdriver{Rokicki's dvips}
  154. {\catcode`\"=12\gdef\pstverb#1{\special{" #1}}}  % Check catcode of "
  155. \def\pstunit{1bp}%
  156. \def\pstVerb#1{\special{ps: #1}}
  157. \def\pstverbscale{SDict begin normalscale end}
  158. \def\pstheader#1{\special{header=#1}}
  159. %%
  160. %% In the following, CP is short for currentpoint.
  161. %% The neg is necessary because dvips scales the coordinates by 1 -1.
  162. %% \tx@NET means neg exch neg exch translate.
  163. \def\pstrotate{%
  164.   CP CP translate 3 -1 roll neg rotate \tx@NET}
  165. %%
  166. %% If using a version before 5.47, clipping may not work. You can
  167. %% try the following definition of \pstverb:
  168. %\def\pstverb#1{\special{ps: @beginspecial #1 @endspecial}}
  169. %% or change "{initclip}ifelse" to "if" in the definition of @setspecial
  170. %% in dvips' special.pro.
  171. %%
  172. %% ****************** END Rokicki's dvips *****************************
  173.  
  174.  
  175. %% **********************************************************************
  176. %% **** Arbortext's dvips *** Arbortext's dvips *** Arbortext's dvips ***
  177. %% **********************************************************************
  178. %% Thanks to Wolfgang Sienel:
  179. %%
  180. \def\pstdriver{Arbortext's dvips}
  181. \def\pstverb#1{%
  182.   \special{ps::[asis] 0 SPB /ChartCheckPoint save def
  183.   Xpos Ypos translate #1 ChartCheckPoint restore 0 SPE}}
  184. \def\pstunit{1bp}
  185. \def\pstVerb#1{\special{ps:: #1}}
  186. \def\pstverbscale{}
  187. \def\pstrotate{CP CP translate 3 -1 roll rotate \tx@NET}
  188. \def\pstheader#1{%
  189.   \typeout{**********************************************************}%
  190.   \typeout{** Don't forget to include #1 when printing:}%
  191.   \typeout{** \space\space dvips -PRO #1 myfile}%
  192.   \typeout{**********************************************************}}
  193. %%
  194. %% Comments by Wolfgang on header files:
  195. %%  Normally the  standard prolog file is  downloaded once to the printer
  196. %%  with psload.ps (the initializing  file for your  TeX-printer)  before
  197. %%  printing  TeX-documents.  If you don't  make any changes to psload.ps
  198. %%  you  have  to type  dvips -PRO PATH/pstricks.pro myfile   (-PRO  just
  199. %%  works for  UNIX systems.  I don't have any idea about other systems).
  200. %%  If psload.ps  was not  downloaded to the  printer  you have to append
  201. %%  pstricks.pro  to  the standard  prolog  file dvips.pro.  In this case
  202. %%  invoke  dvips as always.   Note that after hitting  the enter key you
  203. %%  have to specify the option download all prolog in both cases.  If you
  204. %%  are frequently using pstricks you might want to change psload.ps.  In
  205. %%  this case contact your local TeX-guru and ask him politely to do this
  206. %%  for you. Attention: If psload.ps is getting too big you may run  into
  207. %%  trouble with printer memory!
  208. %%
  209. %% ****************** END Arbortext's dvips *****************************
  210.  
  211.  
  212. %% **********************************************************************
  213. %% **** Textures *** Textures *** Textures *** Textures *** Textures ****
  214. %% **********************************************************************
  215. %% These have been tested with v1.3. It is nice to have a PostScript
  216. %% screen previewer, such as TScript (USA: 1-617-734-9700). (The
  217. %% Textures preview window will not show the PSTricks graphics.)
  218. %%
  219. \def\pstdriver{Textures}
  220. \def\pstunit{1bp}
  221. \def\pstverb#1{\special{postscript /TX@Save save def #1 TX@save restore}}
  222. \def\pstVerb#1{\special{postscript grestore #1 gsave}}
  223. \def\pstverbscale{Mag 1000 div 72.27 72 div mul dup neg scale}
  224. \def\pstrotate{%
  225.   CP CP translate 3 -1 roll neg rotate \tx@NET}
  226. %%
  227. %% \pstVerb does not define the currentpoint properly. As a workaround,
  228. %% insert the following lines in the customization section above.
  229. %%
  230. %%   \def\pst@Verb#1{%
  231. %%     \special{postscript \pst@dict /sps { moveto /Mag ed } def
  232. %%       userdict begin}%
  233. %%     \special{postscript #1 end gsave}}
  234. %%
  235. %% Textures does not support header files.
  236. %% However, it may still be worth using a header file for increased speed.
  237. %% Also, some macros can overload Textures 1.3 when not used with a header
  238. %% file. You can include the header file pstricks.pro by saving the
  239. %% PostScript output to a file and inserting the pstricks.pro with an
  240. %% editor. Probably a better solution is to append pstricks.pro to a
  241. %% copy of the laserprep, and, by changing file names of the modified
  242. %% laserprep and the original laserprep, use the laserprep with pstricks.pro
  243. %% whenever you are printing pstricks documents.
  244. \def\pstheader#1{%
  245.   \typeout{******************************************}%
  246.   \typeout{*** Include header file #1!! ***}%
  247.   \typeout{******************************************}}
  248. %%
  249. %% ****************** END Textures **************************************
  250.  
  251.  
  252. %% **********************************************************************
  253. %% ***** dvi2ps ***** dvi2ps ***** dvi2ps ***** dvi2ps ***** dvi2ps *****
  254. %% **********************************************************************
  255. %% I.e., dvi2ps, v2.xx. There are lot's of such things around.
  256. %% This probably doesn't work. Considering upgrading to Rokicki's dvips.
  257. %%
  258. \def\pstdriver{dvi2ps v2.xx}
  259. \def\pstunit{1pt}
  260. \def\pstverb#1{ pstext="save currentpoint translate
  261.   Resolution 72.27 div neg scale #1 restore" \space}
  262. \def\pstVerb#1{ pstext="#1" \space}
  263. \def\pstverbscale{Resolution 72.27 div neg scale}
  264. \def\pstrotate{%
  265.   CP CP translate 3 -1 roll neg rotate \tx@NET}
  266. \def\pstheader#1{%
  267.   \typeout{******************************************************}
  268.   \typeout{Don't forget to include the header file #1!!}
  269.   \typeout{******************************************************}
  270. %%
  271. %% ***************************** END dvi2ps *****************************
  272.  
  273.  
  274. %% **********************************************************************
  275. %% ***** dvi3ps ***** dvi3ps ***** dvi3ps ***** dvi3ps ***** dvi3ps *****
  276. %% **********************************************************************
  277. %% I.e., dvi2ps, version 3.xx, by Kevin Coombes.
  278. %% This has not been tested. Consider upgrading to Rokicki's dvips.
  279. %%
  280. \def\pstdriver{dvi2ps v3.xx}
  281. \def\pstunit{1bp}
  282. \def\pstverb#1{pstext="#1"}
  283. % \def\pstVerb#1{%
  284. %   \special{pstext="@endspecial #1 @beginspecial @setspecial"}}  % v3.0
  285. \def\pstVerb#1{\special{psraw="#1"}}                            % v3.3
  286. \def\pstverbscale{Resolution 72.27 div neg scale}
  287. \def\pstrotate{%
  288.   CP CP translate 3 -1 roll neg rotate \tx@NET}
  289. \def\pstheader#1{%
  290.   \typeout{******************************************************}
  291.   \typeout{Don't forget to include the header file #1!!}
  292.   \typeout{******************************************************}
  293. %%
  294. %% ******************* END dvi3ps ***************************************
  295.  
  296.  
  297. %% **********************************************************************
  298. %% **** OzTeX **** OzTeX **** OzTeX **** OzTeX **** OzTeX **** OzTeX ****
  299. %% **********************************************************************
  300. %% Only the pure graphics objects are supported for OzTeX.
  301. %% No color, rotation, clipping, nodes and node connections, overlays, etc.
  302. %% Also, \rput cannot be used with \SpecialCoor.
  303. %%
  304. %% The reason is given in the documentation for Version 1.3, September 1990:
  305. %%
  306. %%   OzTeX generates highly efficient PostScript code but it does so at
  307. %%   the expense of some \special functionality. Many DVI-to-PostScript
  308. %%   translators allow you to do things like use one \verb|\special| to start
  309. %%   rotating TeX text and another to stop the rotation. The way OzTeX
  310. %%   interprets a DVI page makes this impossible.
  311. %%
  312. %% If using the header file, you should copy pstricks.pro to global.ps, in
  313. %% the same directory as your dvi file.
  314. %%
  315. \def\pstdriver{OzTeX}
  316. \def\pstverb#1{\special{null.ps #1}}
  317. \def\pstunit{1bp}
  318. \def\pstVerb#1{%
  319.   \typeout{PSTRICKS WARNING:}%
  320.   \typeout{\space\space You are using features not supported by OzTeX.}%
  321.   \typeout{\space\space These will be ignored.}%
  322.   \gdef\pstVerb##1{}}
  323. \def\pstverbscale{}
  324. \def\pstrotate{}
  325. \def\pstheader#1{%
  326.   \typeout{******************************************************}
  327.   \typeout{Don't forget to include the header file #1!!}
  328.   \typeout{******************************************************}}
  329. %%
  330. %% ************************* END OzTeX **********************************
  331.  
  332.  
  333. %% **********************************************************************
  334. %% ***** DirectTeX ***** DirectTeX ***** DirectTeX ***** DirectTeX ******
  335. %% **********************************************************************
  336. %% DirectTeX is for the Macintosh. These has been tested unsuccessfully,
  337. %% apparently due to a problem with DirectTeX.
  338. %%
  339. \def\pstdriver{DirectTeX}
  340. %%
  341. %% Check catcode of "
  342. {\catcode`\"=12\gdef\pstverb#1{\special{" #1 /Foo{}def }}}
  343. \def\pstunit{1bp}
  344. \def\pstVerb#1{\special{ps: #1 }}
  345. \def\pstverbscale{TeXDict begin normalscale end}
  346. %%
  347. %% In the following, CP is short for currentpoint. The neg is necessary
  348. %% because dvips scales the coordinates by 1 -1:
  349. \def\pstrotate{%
  350.   CP CP translate 3 -1 roll neg rotate \tx@NET}
  351. %%
  352. \def\pstheader#1{%
  353.   \typeout{**********************************************************}%
  354.   \typeout{** Don't forget to include #1 when printing:}%
  355.   \typeout{** \space\space DVIReader -header #1 myfile}%
  356.   \typeout{**********************************************************}}
  357. %%
  358. %% ****************** END DirectTeX *****************************
  359.  
  360.  
  361. %% END pstricks.con
  362.